﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ETA.Common
{
    public class Config
    {
        /// <summary>
        /// 数据库运行模式
        /// </summary>
        public static string RunModel
        {
            get
            {
                return CommHelper.GetValue("runModel");
            }
        }

        /// <summary>
        /// APP服务令牌
        /// </summary>
        public static string WebApiToken
        {
            get
            {
                return CommHelper.GetValue("WebApiToken");
            }
        }

        /// <summary>
        /// 加密字符串
        /// </summary>
        public static string MD5Str
        {
            get
            {
                return CommHelper.GetValue("MD5Str");
            }
        }

        /// <summary>
        /// 登录超时时间
        /// </summary>
        public static int ExpirationTime
        {
            get
            {
                return Convert.ToInt16(CommHelper.GetValue("ExpirationTime"));
            }
        }

        /// <summary>
        /// 短信发送账号
        /// </summary>
        public static string SMSAccount
        {
            get
            {
                return CommHelper.GetValue("SMSAccount");
            }
        }

        /// <summary>
        /// 密码
        /// </summary>
        public static string SMSPassword
        {
            get
            {
                return CommHelper.GetValue("SMSPassword");
            }
        }

        /// <summary>
        /// 字号码
        /// </summary>
        public static string SMSSubCode
        {
            get
            {
                return CommHelper.GetValue("SMSSubCode");
            }
        }

        /// <summary>
        /// 短信发送前缀
        /// </summary>
        public static string SMSPrefix
        {
            get
            {
                return CommHelper.GetValue("SMSPrefix");
            }
        }

        /// <summary>
        /// 注册短信模板
        /// </summary>
        public static string SMSRegistContent
        {
            get
            {
                return CommHelper.GetValue("SMSRegistContent");
            }
        }

        /// <summary>
        /// 短信接口地址
        /// </summary>
        public static string SMSUrl
        {
            get
            {
                return CommHelper.GetValue("SMSUrl");
            }
        }

        /// <summary>
        /// 文档地址
        /// </summary>
        public static string DocUrl
        {
            get
            {
                return CommHelper.GetValue("DocUrl");
            }
        }

        /// <summary>
        /// 找回密码内容
        /// </summary>
        public static string SMSGetpwdContent
        {
            get
            {
                return CommHelper.GetValue("SMSGetpwdContent");
            }
        }

        /// <summary>
        /// 发送邮箱
        /// </summary>
        public static string EmailFrom
        {
            get
            {
                return CommHelper.GetValue("EmailFrom");
            }
        }

        /// <summary>
        /// 发邮人
        /// </summary>
        public static string EmailFromer
        {
            get
            {
                return CommHelper.GetValue("EmailFromer");
            }
        }

        /// <summary>
        /// SMTPHost服务器
        /// </summary>
        public static string SMTPHost
        {
            get
            {
                return CommHelper.GetValue("SMTPHost");
            }
        }


        /// <summary>
        /// 发件人邮箱
        /// </summary>
        public static string SMTPuser
        {
            get
            {
                return CommHelper.GetValue("SMTPuser");
            }
        }


        /// <summary>
        /// 发送邮箱密码
        /// </summary>
        public static string SMTPpass
        {
            get
            {
                return CommHelper.GetValue("SMTPpass");
            }
        }

        /// <summary>
        /// 文件后缀
        /// </summary>
        public static string FileExt
        {
            get
            {
                return CommHelper.GetValue("FileExt");
            }
        }

        /// <summary>
        /// 文件上传路径
        /// </summary>
        public static string FilePath
        {
            get
            {
                return CommHelper.GetValue("FilePath");
            }
        }

        /// <summary>
        /// 获取路径
        /// </summary>
        public static string LoadUrl
        {
            get
            {
                return CommHelper.GetValue("LoadUrl");
            }
        }

        /// <summary>
        /// 获取时间间隔 单位分钟
        /// </summary>
        public static int LoadInterval
        {
            get
            {
                return Int32.Parse(CommHelper.GetValue("LoadInterval")) * 60 * 1000;
            }
        }

        /// <summary>
        /// 初试密码
        /// </summary>
        public static string DefaultPassword
        {
            get
            {
                return CommHelper.GetValue("DefaultPassword");
            }
        }

        public static int ReferrerPoint
        {
            get
            {
                return Convert.ToInt32(CommHelper.GetValue("ReferrerPoint"));
            }
        }

        /// <summary>
        /// 在线测评考试类型
        /// </summary>
        public static string OnlineTestKind
        {
            get
            {
                return CommHelper.GetValue("OnlineTestKind");
            }
        }

        /// <summary>
        /// 详细测试考试类型
        /// </summary>
        public static string DetailTestKind
        {
            get
            {
                return CommHelper.GetValue("DetailTestKind");
            }
        }

        public static string BannerUrl
        {
            get
            {
                return CommHelper.GetValue("BannerUrl");
            }
        }
        

    }
}
